package main


func testzuidalianxuzichuan(arr []int) int  {
	tmp,max := 0,0
	for _,k := range arr {
		tmp += k
		if tmp < 0 {
			tmp = 0
		}else if max < tmp {
		  max = tmp
		}
	}
	return  max
}
